#ifndef OPERASQLITE_H
#define OPERASQLITE_H

#include <QObject>
#include <QSqlDatabase>
#include <QSqlDriver>
#include <QSqlError>
#include <QSqlRecord>
#include <QtSql>

static QString clearSeq = QString("delete from ");
class operaSqlite : QObject {
  Q_OBJECT
public:
  operaSqlite();
  ~operaSqlite();
  void setContain(QString);
  void openTransaction();
  void closeTransaction();
  void write(const QString &);
  bool openSqlite(QString myDb, QString &error);
  bool closeSqlite();
  QStringList getTableInfo(QString tabName);
  void clearSqlite(QString &tableName);
  bool reconTable(const QString &tableName, const QStringList &head);
  bool isOpen();
  QSqlDatabase getDb();

private:
private:
  QSqlDatabase sqliteDb;
  QString sqlContain;
  QString contions;
};

#endif // OPERASQLITE_H
